import torch

# 创建一个一维张量
ratio = torch.tensor([0.8, 0.9, 1.0, 1.1, 1.2])

# 使用 view 方法将张量重塑为二维张量，形状为 (5, 1)
ratio_reshaped = ratio.view(-1, 1)
print(ratio_reshaped)